package jimmy.com;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class ThemePage extends Activity {
    /** Called when the activity is first created. */
    ListView themelist;
    ThemeAdapter adapter;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.themepage);
        themelist=(ListView)findViewById(R.id.themelist);
        adapter=new ThemeAdapter(this, imageurls, theme_titles, commentnums, fitnums);
        themelist.setAdapter(adapter);
    }
    public void onDestroy()
    {
        adapter.imageLoader.stopThread();
        themelist.setAdapter(null);
        
        super.onDestroy();            
        //adapter.imageLoader.clearCache();
        //adapter.notifyDataSetChanged();
    }
    // fake data
    private String[] imageurls={"http://a1.twimg.com/profile_images/957149154/twitterhalf_normal.jpg","http://t1.gstatic.com/images?q=tbn:ANd9GcQOt-KxnHAd5CcAtAqGwLIdy843XL4E1KgxxBv6kWv_L2Y30QItEs8zG8c0"};
    private String[] theme_titles={"Leisure fashion","Female tycoon"};
    private int[] commentnums = {2,3};
    private int[] fitnums = {1,4};
}
